'use strict';

import React from 'react';
import { connect } from 'react-redux';
import { Link} from 'react-router';
import { Button,Icon,Feedback} from 'qnui';
import { Row, Col } from 'qnui/lib/grid';
import Breadcrumb from 'qnui/lib/breadcrumb'
import Step, { Item as StepItem } from 'qnui/lib/step';
import './index.scss';

class RingTagStep4 extends React.Component {
    constructor(props) {
        super(props);
		this.dispatch = this.props.dispatch;
        this.state = {
        };
    }

  render() {
  	const step3 = this.props.state.ring_tag_step2.needItems?<StepItem title="选择商品" />:"";
	const setpCurrent =this.props.state.ring_tag_step2.needItems?3:2;
	return (
        <div className="page1-page">
			<Row style={{background:"#F6F6F6",margin:"3px 0"}} justify="start">
			<Col span="8" align="center">
			<Breadcrumb maxNode={5}>
				  <Breadcrumb.Item>连环折扣</Breadcrumb.Item>
				  <Breadcrumb.Item>创建</Breadcrumb.Item>
				  <Breadcrumb.Item>完成</Breadcrumb.Item>
			  </Breadcrumb>
			</Col>
			<Col offset="2">
					<Step current={setpCurrent} type="dot">
						<StepItem title="设置标签" />
						<StepItem title="创建折扣"/>
						{step3}
						<StepItem title="完成"/>
					</Step>
			</Col>
		  </Row>
          <Row justify="start">
			  <Col span="24" align="center">
				<Feedback title="完成设置" type="success" size="large">
					您已完成设置。您可以 <Link to="/ring_tags_step1"><Button>继续创建</Button></Link> 更多倒计时折扣，
					还可以  <Link to="/ring_tags"><Button>查看所有倒计时折扣</Button></Link> 
				</Feedback>
			  </Col>
          </Row>
        </div>
    );
  }
}


export default connect((state)=> {
  return {
    state
  };
})(RingTagStep4);
